<style>
    .node-list li{display: inline-block}
</style>
<div  ng-controller="managerAdminSaveCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">{{state?'编辑':'添加'}}角色</h1>
    </div>
    <div class="wrapper-md" >
        <div class="panel panel-default">
            <div class="panel-heading">
                <label class="control-label ">{{state?'编辑':'添加'}}角色</label>
                <a class="btn btn-default btn-addon btn-sm pull-right" href="javascript:history.go(-1)"></i>返回</a>
            </div>
            <div class="panel panel-body">
                <form class="form-horizontal" ng-submit="ok(state)">
                    <div class="form-group">
                        <div class="col-sm-1"><label class="control-label">名字</label></div>
                        <div class="col-sm-5">
                            <input type="text" ng-model="info.name" class="form-control">
                        </div>
                        <div class="col-sm-2">
                            <label class="control-label">状态<em class="text-muted">(绿色为启动)</em></label>
                        </div>
                        <div class="col-sm-4">
                            <label class="i-switch m-t-xs m-r">
                                <input type="checkbox" checked ng-model="info.status">
                                <i></i>
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12"><label>备注</label></div>
                        <div class="col-sm-12">
                            <textarea class="form-control" ng-model="info.info" rows="10"></textarea>
                        </div>
                    </div>
                    <div class="line line-dashed b-b line-lg"></div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <label class="control-label ">配置权限</label>
                        </div>
                        <div class="panel panel-body">
                            <div class="row b-b" ng-repeat="ctrllor in node">
                                <div class="col-sm-12  b-light">
                                    <div class="checkbox wrapper">
                                        <label class="i-checks ">
                                            <input type="checkbox" ng-model="ctrllor.select" ng-change="changeFn(ctrllor,1)">
                                            <i></i>
                                            {{ctrllor.info}}
                                        </label>
                                    </div>
                                    <div class="line line-dashed b-b line-lg m-n"></div>
                                </div>
                                <div class="col-sm-12">
                                    <ul class="node-list m-b-sm m-t-sm padder">
                                        <li class="m-r-sm m-l-sm" ng-repeat="func in ctrllor.functionNode">
                                            <div class="checkbox">
                                                <label class="i-checks">
                                                    <input type="checkbox" ng-model="func.select"  ng-change="changeFn(func,0,ctrllor)">
                                                    <i></i>
                                                    {{func.info}}
                                                </label>
                                            </div>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-8 text-right">
                            <button type="submit" class="btn btn-sm btn-success">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


